#pragma once
#include <QWidget>
#include <widgets/Defines.h>
class BondInterSearchEngine;
class DetailData;
class KeySearchWidget;
class SImageButton;
class BondDetailTitleEdit : public QWidget
{
public:
    BondDetailTitleEdit(QWidget* p);
    void setDetailData(QSharedPointer<DetailData> d);
	void loadBondInterSEInfo();

public slots:
	void onSearchFocusChanged(bool v);

protected:
	void mousePressEvent(QMouseEvent* event) override;
	void enterEvent(QEvent* event) override;
	void leaveEvent(QEvent* event) override;
	void paintEvent(QPaintEvent* event) override;
	void mouseReleaseEvent(QMouseEvent* event) override;
	void resizeEvent(QResizeEvent* event) override;

private:
	BondInterSearchEngine* m_bondInterSearchE = nullptr;
	QSharedPointer<DetailData> m_data = nullptr;
	KeySearchWidget* m_searchWidget = nullptr;
	WidgetStatus	m_status = kNormal;
	SImageButton* m_favBtn = nullptr;
};